package com.huak.boot.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * {@link HelloApplicationListener} {@link ApplicationListener} 监听{@link ContextRefreshedEvent}
 * @author LR2SD
 * @description
 * @date 2019-03-30 09:43
 */
@Order(Ordered.HIGHEST_PRECEDENCE)
public class HelloApplicationListener implements ApplicationListener<ContextRefreshedEvent>{

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.out.println("HelloApplicationListener event.id="+event.getSource()+" timestamp="+event.getTimestamp());
    }
}
